package com.itany.springcloud.zuul.config;

import com.netflix.loadbalancer.*;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

//@Configuration
@RibbonClient(name = "springcloud-ribbon",configuration = RibbonConfig.class)
public class RibbonConfig {

    @Bean
    public IRule ribbonRule(){

        return new RoundRobinRule();
//        return new RandomRule();
//        return new BestAvailableRule();
//        return new WeightedResponseTimeRule();
    }
}
